package com.ad.platform.api;

import com.ad.payload.dto.JielongOrderDto;
import com.ad.platform.service.IPreOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 小程序 访问接口  订单信息
 */
@RestController
@RequestMapping("/preOrderApi")
public class PreOrderApi {

    @Autowired
    private IPreOrderService iPreOrderService;

    /**
     * 创建接龙订单
     * @param
     * @return
     */
    @PostMapping("/client/noAuth/createJielongOrder")
    public String createJielongOrder(JielongOrderDto jielongOrderDto){

        return this.iPreOrderService.createJielongOrder(jielongOrderDto) ? "成功" : "失败";

    }

    /**
     * 支付钱创建普通订单
     * @param
     * @return
     */
    /*@PostMapping("/client/noAuth/insertOrder")
    public String insertOrder(JielongOrderDto jielongOrderDto){

        return this.iPreOrderService.insertOrder(jielongOrderDto) ? "成功" : "失败";

    }*/
}
